package com.zte.user.control;


import com.github.pagehelper.PageInfo;
import com.zte.user.model.SmbmsUser;
import com.zte.user.model.UserCondition;
import com.zte.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/user")
public class UserAction {

    @Autowired
    private IUserService userService;

    @RequestMapping("/userPage")
    @ResponseBody
    public PageInfo<SmbmsUser> getUserPageByCondition(PageInfo<SmbmsUser> info,UserCondition conn){
        PageInfo<SmbmsUser> page = userService.getUserPageByCondition(info, conn);
        return page;
    }
    @RequestMapping("/user1")
    @ResponseBody
    public List<SmbmsUser> getUserListByCondition( UserCondition conn){
        List<SmbmsUser> page = userService.getUserListByCondition( conn);
        return page;
    }

}
